<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>票易信息管理系统</title>
<link rel="stylesheet" href="/css/admin.css" type="text/css"/>
<link rel="stylesheet" href="/css/redmond.datepick.css" type="text/css" />
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.datepick.min.js"></script>
<script type="text/javascript" src="/js/jquery.datepick-zh-CN.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#startTime").datepick();
});
</script>
</head>
<body leftmargin="2" topmargin="2">
<s:form id="create" action="admin_daily" onsubmit="VF_dailyflag();return false;">
<s:hidden name="action" />
<s:hidden name="id" />
<s:hidden name="goodsId" />
 <fieldset><legend>
 <s:if test="%{action=='doadd'}">添加场次</s:if>
 <s:if test="%{action=='doupdate'}">修改场次</s:if>
 </legend>
 <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <COLGROUP>
  <COL width="100" />
  <COL width="*" />
  <tr class="tdbg3"> 
      <td align="right">时间设置：</td>
      <td><s:select list="limitTimeList" name="limitTime" id="limitTime" listKey="key" listValue="value"></s:select></td>
    </tr>
    <tr class="tdbg3"> 
      <td align="right">开始时间：</td>
      <td>日期:<s:textfield id="startTime" name="startTime" size="20"><s:param name="value"><s:date name="startTime" format="yyyy-MM-dd" /></s:param></s:textfield> 小时<s:textfield id="startHour" name="startHour" size="5"/>分钟<s:textfield id="startMinute" name="startMinute" size="5"/></td>
    </tr>
    <tr class="tdbg3"> 
      <td align="right">星  期：</td>
      <td><s:select list="startWeekList" name="startWeek" id="startWeek" listKey="key" listValue="value"></s:select></td>
    </tr>
     <tr class="tdbg3">
      <td colspan="2" align="center"><s:submit value="提交"/></td>
    </tr>
</table></fieldset>
</s:form>
<script type="text/javascript">
function VF_dailyflag(){ 
    var errMsg = "";
    if($('#limitTime').val() == 1){
		if ($('#startWeek').val() == -1){
	        errMsg = "请选择星期！";
	    }
	    if ($('#startMinute').val() == ""){
	        errMsg = "请填写开始分钟！";
	    }
	    if ($('#startHour').val() == ""){
	        errMsg = "请填写开始小时！";
	    }
	    if ($('#startTime').val() == ""){
	        errMsg = "请填写开始时间！";
	    }
    }
    if (errMsg != ""){
        alert(errMsg);
    }else{
		document.getElementById('create').submit();
	}
}
</script>
</body>
</html>
